<?php
Authenticate::requireAccounting();
try {
	$searchText = isset($_GET['searchText'])? $_GET['searchText']: null;
	//$accounts = Account::instance()->get(array('email'=> $searchText, 'name'=> $searchText));
    $accounts = Account::instance()->get(null, array('order'=> 'createTime DESC'));
	View::display('accounting/account', array('accounts'=> $accounts, 'searchText'=> $searchText));
} catch(Exception $ex) {
	Log::error($ex);
	View::display('error', array('message' => $ex->getMessage()));
}